package com.kakarote.hrm.constant;

import lombok.Getter;

@Getter
public enum EducationEnum {
    ONE(1, "小学"),
    TWO(2, "初中"),
    THREE(3, "高中"),
    FOR(4, "中专"),
    FIVE(5, "大专"),
    SIX(6, "大学"),
    SEVEN(7, "硕士研究生"),
    EIGHT(8, "博士研究生");

    private Integer value;
    private String name;

    EducationEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(Integer value) {
        for (EducationEnum educationEnum : EducationEnum.values()) {
            if (educationEnum.getValue().equals(value)) {
                return educationEnum.getName();
            }
        }
        return "";
    }


}
